#include <iostream>

using namespace std;

template <typename T> void swap2num(T *a, T *b);

int main(void)
{
	int n1 = 1, n2 = 2;
	float f1 = 1.1, f2 = 2.2;

	swap2num(&n1, &n2);
	swap2num(&f1, &f2);

	cout << n1 << "," << n2 << endl;
	cout << f1 << "," << f2 << endl;

	return 0;
}

template <typename T>
void swap2num(T *a, T *b)
{
	T t;
	t = *a;
	*a = *b;
	*b = t;
}


